import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;

/**
 * Module Name:
 * Description:
 * Calling Sequence
 * 		Input Parameters
 * 		Output Parameters
 * Error Conditions Tested:
 * Error Messages Generated:
 * Original Author:
 * Procedure Creation Date:
 * Modification Log:
 * 	 Who/When/Why
 * Coding Standards Met: "Signed Code Leader(Jaron)"
 * Testing Standards Met: "Signed Test Leader(Jamie)"
 */
public class SymbolTableTest {

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		SymbolTable.startSymbolTable();
		SymbolTable.addSymbol("aa");
	}
	
	/**
	 * Test method for 
	 * {@link SymbolTable#returnUsage(java.lang.String)}.
	 */
	@Test
	public void testReturnUsageForSymbol() {
		String given = new String("Instruction Label");
		String testOutput = new String("");
		
		SymbolTable.editUsage("aa", given);
		testOutput = SymbolTable.returnUsage("aa");
		
		assertEquals("Symbol Table should return given " +
				"Usage for Symbol", given, testOutput);
	}
	
	@Test
	public void testSymbolLengthA(){
		String sym = "abcdefghijklmnopqrstuvwxyz0123456789aaabacadaeafagahaiakalamanao";
		SymbolTable.addSymbol(sym);
		boolean test = SymbolTable.symbolIsDefined(sym);
		
		assertEquals("Should be true", true, test);
	}
	
	@Test
	public void testSymbolLengthB() {
		String sym = "abcdefghijklmnopqrstuvwxyz0123x456789aaabacadaeafagahaiakalamanao";
		SymbolTable.addSymbol((sym + sym));
		boolean test = SymbolTable.symbolIsDefined(sym + sym);
		assertEquals("Should be true", true, test);
	}
	
}
